﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x020000EC RID: 236
	[Serializable]
	public class ColorGradingModel : PostProcessingModel
	{
		// Token: 0x17000090 RID: 144
		// (get) Token: 0x0600060E RID: 1550 RVA: 0x00024E70 File Offset: 0x00023070
		// (set) Token: 0x0600060F RID: 1551 RVA: 0x00024E78 File Offset: 0x00023078
		public ColorGradingModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
				this.OnValidate();
			}
		}

		// Token: 0x17000091 RID: 145
		// (get) Token: 0x06000610 RID: 1552 RVA: 0x00024E88 File Offset: 0x00023088
		// (set) Token: 0x06000611 RID: 1553 RVA: 0x00024E90 File Offset: 0x00023090
		public bool isDirty { get; internal set; }

		// Token: 0x17000092 RID: 146
		// (get) Token: 0x06000612 RID: 1554 RVA: 0x00024E9C File Offset: 0x0002309C
		// (set) Token: 0x06000613 RID: 1555 RVA: 0x00024EA4 File Offset: 0x000230A4
		public RenderTexture bakedLut { get; internal set; }

		// Token: 0x06000614 RID: 1556 RVA: 0x00024EB0 File Offset: 0x000230B0
		public override void Reset()
		{
			this.m_Settings = ColorGradingModel.Settings.defaultSettings;
			this.OnValidate();
		}

		// Token: 0x06000615 RID: 1557 RVA: 0x00024EC4 File Offset: 0x000230C4
		public override void OnValidate()
		{
			this.isDirty = true;
		}

		// Token: 0x04000591 RID: 1425
		[SerializeField]
		private ColorGradingModel.Settings m_Settings = ColorGradingModel.Settings.defaultSettings;

		// Token: 0x020000ED RID: 237
		public enum Tonemapper
		{
			// Token: 0x04000595 RID: 1429
			None,
			// Token: 0x04000596 RID: 1430
			ACES,
			// Token: 0x04000597 RID: 1431
			Neutral
		}

		// Token: 0x020000EE RID: 238
		[Serializable]
		public struct TonemappingSettings
		{
			// Token: 0x17000093 RID: 147
			// (get) Token: 0x06000616 RID: 1558 RVA: 0x00024ED0 File Offset: 0x000230D0
			public static ColorGradingModel.TonemappingSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.TonemappingSettings
					{
						tonemapper = ColorGradingModel.Tonemapper.Neutral,
						neutralBlackIn = 0.02f,
						neutralWhiteIn = 10f,
						neutralBlackOut = 0f,
						neutralWhiteOut = 10f,
						neutralWhiteLevel = 5.3f,
						neutralWhiteClip = 10f
					};
				}
			}

			// Token: 0x04000598 RID: 1432
			[Tooltip("Tonemapping algorithm to use at the end of the color grading process. Use \"Neutral\" if you need a customizable tonemapper or \"Filmic\" to give a standard filmic look to your scenes.")]
			public ColorGradingModel.Tonemapper tonemapper;

			// Token: 0x04000599 RID: 1433
			[Range(-0.1f, 0.1f)]
			public float neutralBlackIn;

			// Token: 0x0400059A RID: 1434
			[Range(1f, 20f)]
			public float neutralWhiteIn;

			// Token: 0x0400059B RID: 1435
			[Range(-0.09f, 0.1f)]
			public float neutralBlackOut;

			// Token: 0x0400059C RID: 1436
			[Range(1f, 19f)]
			public float neutralWhiteOut;

			// Token: 0x0400059D RID: 1437
			[Range(0.1f, 20f)]
			public float neutralWhiteLevel;

			// Token: 0x0400059E RID: 1438
			[Range(1f, 10f)]
			public float neutralWhiteClip;
		}

		// Token: 0x020000EF RID: 239
		[Serializable]
		public struct BasicSettings
		{
			// Token: 0x17000094 RID: 148
			// (get) Token: 0x06000617 RID: 1559 RVA: 0x00024F38 File Offset: 0x00023138
			public static ColorGradingModel.BasicSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.BasicSettings
					{
						postExposure = 0f,
						temperature = 0f,
						tint = 0f,
						hueShift = 0f,
						saturation = 1f,
						contrast = 1f
					};
				}
			}

			// Token: 0x0400059F RID: 1439
			[Tooltip("Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect and right before tonemapping so it won't affect previous effects in the chain.")]
			public float postExposure;

			// Token: 0x040005A0 RID: 1440
			[Tooltip("Sets the white balance to a custom color temperature.")]
			[Range(-100f, 100f)]
			public float temperature;

			// Token: 0x040005A1 RID: 1441
			[Range(-100f, 100f)]
			[Tooltip("Sets the white balance to compensate for a green or magenta tint.")]
			public float tint;

			// Token: 0x040005A2 RID: 1442
			[Range(-180f, 180f)]
			[Tooltip("Shift the hue of all colors.")]
			public float hueShift;

			// Token: 0x040005A3 RID: 1443
			[Range(0f, 2f)]
			[Tooltip("Pushes the intensity of all colors.")]
			public float saturation;

			// Token: 0x040005A4 RID: 1444
			[Range(0f, 2f)]
			[Tooltip("Expands or shrinks the overall range of tonal values.")]
			public float contrast;
		}

		// Token: 0x020000F0 RID: 240
		[Serializable]
		public struct ChannelMixerSettings
		{
			// Token: 0x17000095 RID: 149
			// (get) Token: 0x06000618 RID: 1560 RVA: 0x00024F98 File Offset: 0x00023198
			public static ColorGradingModel.ChannelMixerSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.ChannelMixerSettings
					{
						red = new Vector3(1f, 0f, 0f),
						green = new Vector3(0f, 1f, 0f),
						blue = new Vector3(0f, 0f, 1f),
						currentEditingChannel = 0
					};
				}
			}

			// Token: 0x040005A5 RID: 1445
			public Vector3 red;

			// Token: 0x040005A6 RID: 1446
			public Vector3 green;

			// Token: 0x040005A7 RID: 1447
			public Vector3 blue;

			// Token: 0x040005A8 RID: 1448
			[HideInInspector]
			public int currentEditingChannel;
		}

		// Token: 0x020000F1 RID: 241
		[Serializable]
		public struct LogWheelsSettings
		{
			// Token: 0x17000096 RID: 150
			// (get) Token: 0x06000619 RID: 1561 RVA: 0x00025008 File Offset: 0x00023208
			public static ColorGradingModel.LogWheelsSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.LogWheelsSettings
					{
						slope = Color.clear,
						power = Color.clear,
						offset = Color.clear
					};
				}
			}

			// Token: 0x040005A9 RID: 1449
			[Trackball("GetSlopeValue")]
			public Color slope;

			// Token: 0x040005AA RID: 1450
			[Trackball("GetPowerValue")]
			public Color power;

			// Token: 0x040005AB RID: 1451
			[Trackball("GetOffsetValue")]
			public Color offset;
		}

		// Token: 0x020000F2 RID: 242
		[Serializable]
		public struct LinearWheelsSettings
		{
			// Token: 0x17000097 RID: 151
			// (get) Token: 0x0600061A RID: 1562 RVA: 0x00025044 File Offset: 0x00023244
			public static ColorGradingModel.LinearWheelsSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.LinearWheelsSettings
					{
						lift = Color.clear,
						gamma = Color.clear,
						gain = Color.clear
					};
				}
			}

			// Token: 0x040005AC RID: 1452
			[Trackball("GetLiftValue")]
			public Color lift;

			// Token: 0x040005AD RID: 1453
			[Trackball("GetGammaValue")]
			public Color gamma;

			// Token: 0x040005AE RID: 1454
			[Trackball("GetGainValue")]
			public Color gain;
		}

		// Token: 0x020000F3 RID: 243
		public enum ColorWheelMode
		{
			// Token: 0x040005B0 RID: 1456
			Linear,
			// Token: 0x040005B1 RID: 1457
			Log
		}

		// Token: 0x020000F4 RID: 244
		[Serializable]
		public struct ColorWheelsSettings
		{
			// Token: 0x17000098 RID: 152
			// (get) Token: 0x0600061B RID: 1563 RVA: 0x00025080 File Offset: 0x00023280
			public static ColorGradingModel.ColorWheelsSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.ColorWheelsSettings
					{
						mode = ColorGradingModel.ColorWheelMode.Log,
						log = ColorGradingModel.LogWheelsSettings.defaultSettings,
						linear = ColorGradingModel.LinearWheelsSettings.defaultSettings
					};
				}
			}

			// Token: 0x040005B2 RID: 1458
			public ColorGradingModel.ColorWheelMode mode;

			// Token: 0x040005B3 RID: 1459
			[TrackballGroup]
			public ColorGradingModel.LogWheelsSettings log;

			// Token: 0x040005B4 RID: 1460
			[TrackballGroup]
			public ColorGradingModel.LinearWheelsSettings linear;
		}

		// Token: 0x020000F5 RID: 245
		[Serializable]
		public struct CurvesSettings
		{
			// Token: 0x17000099 RID: 153
			// (get) Token: 0x0600061C RID: 1564 RVA: 0x000250B8 File Offset: 0x000232B8
			public static ColorGradingModel.CurvesSettings defaultSettings
			{
				get
				{
					return new ColorGradingModel.CurvesSettings
					{
						master = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						red = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						green = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						blue = new ColorGradingCurve(new AnimationCurve(new Keyframe[]
						{
							new Keyframe(0f, 0f, 1f, 1f),
							new Keyframe(1f, 1f, 1f, 1f)
						}), 0f, false, new Vector2(0f, 1f)),
						hueVShue = new ColorGradingCurve(new AnimationCurve(), 0.5f, true, new Vector2(0f, 1f)),
						hueVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, true, new Vector2(0f, 1f)),
						satVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, false, new Vector2(0f, 1f)),
						lumVSsat = new ColorGradingCurve(new AnimationCurve(), 0.5f, false, new Vector2(0f, 1f)),
						e_CurrentEditingCurve = 0,
						e_CurveY = true,
						e_CurveR = false,
						e_CurveG = false,
						e_CurveB = false
					};
				}
			}

			// Token: 0x040005B5 RID: 1461
			public ColorGradingCurve master;

			// Token: 0x040005B6 RID: 1462
			public ColorGradingCurve red;

			// Token: 0x040005B7 RID: 1463
			public ColorGradingCurve green;

			// Token: 0x040005B8 RID: 1464
			public ColorGradingCurve blue;

			// Token: 0x040005B9 RID: 1465
			public ColorGradingCurve hueVShue;

			// Token: 0x040005BA RID: 1466
			public ColorGradingCurve hueVSsat;

			// Token: 0x040005BB RID: 1467
			public ColorGradingCurve satVSsat;

			// Token: 0x040005BC RID: 1468
			public ColorGradingCurve lumVSsat;

			// Token: 0x040005BD RID: 1469
			[HideInInspector]
			public int e_CurrentEditingCurve;

			// Token: 0x040005BE RID: 1470
			[HideInInspector]
			public bool e_CurveY;

			// Token: 0x040005BF RID: 1471
			[HideInInspector]
			public bool e_CurveR;

			// Token: 0x040005C0 RID: 1472
			[HideInInspector]
			public bool e_CurveG;

			// Token: 0x040005C1 RID: 1473
			[HideInInspector]
			public bool e_CurveB;
		}

		// Token: 0x020000F6 RID: 246
		[Serializable]
		public struct Settings
		{
			// Token: 0x1700009A RID: 154
			// (get) Token: 0x0600061D RID: 1565 RVA: 0x00025368 File Offset: 0x00023568
			public static ColorGradingModel.Settings defaultSettings
			{
				get
				{
					return new ColorGradingModel.Settings
					{
						tonemapping = ColorGradingModel.TonemappingSettings.defaultSettings,
						basic = ColorGradingModel.BasicSettings.defaultSettings,
						channelMixer = ColorGradingModel.ChannelMixerSettings.defaultSettings,
						colorWheels = ColorGradingModel.ColorWheelsSettings.defaultSettings,
						curves = ColorGradingModel.CurvesSettings.defaultSettings
					};
				}
			}

			// Token: 0x040005C2 RID: 1474
			public ColorGradingModel.TonemappingSettings tonemapping;

			// Token: 0x040005C3 RID: 1475
			public ColorGradingModel.BasicSettings basic;

			// Token: 0x040005C4 RID: 1476
			public ColorGradingModel.ChannelMixerSettings channelMixer;

			// Token: 0x040005C5 RID: 1477
			public ColorGradingModel.ColorWheelsSettings colorWheels;

			// Token: 0x040005C6 RID: 1478
			public ColorGradingModel.CurvesSettings curves;
		}
	}
}
